package com.qf.domain;

import java.util.List;

/**
 * 2020/12/9 17:13
 *
 * @author：Lixubiao
 */
public class PageBean {
    private Integer pageSize; // 页面大小
    private Integer pageNum; // 页码
    private Long totalCount; // 数据总数
    private Long pageCount; // 总页数
    private List<EBookEntry> data; //每页的数据

    public PageBean(Integer pageSize, Integer pageNum, Long totalCount, List<EBookEntry> data) {
        this.pageSize = pageSize;
        this.pageNum = pageNum;
        this.totalCount = totalCount;
        this.data = data;
        this.pageCount = (this.totalCount%this.pageSize==0?this.totalCount/this.pageSize:this.totalCount/this.pageSize+1);

    }
    public PageBean(){

    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Long getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Long totalCount) {
        this.totalCount = totalCount;
    }

    public Long getPageCount() {
        return pageCount;
    }

    public void setPageCount(Long pageCount) {
        this.pageCount = pageCount;
    }

    public List<EBookEntry> getData() {
        return data;
    }

    public void setData(List<EBookEntry> data) {
        this.data = data;
    }
}
